package com.spring.boot.sample.test2.config;

import java.util.Arrays;

import org.springframework.boot.CommandLineRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;


/**
 * 服务启动就执行
* <p>Title:MyStartupRunner </p>
* <p>Description: </p>
* <p>Company: </p> 
* @author kexl
* @date 下午2:21:25
 */
@Component
@Order(value=1)//@order设置执行顺序  @Order 注解的执行优先级是按value值从小到大顺序。
public class MyStartupRunner implements CommandLineRunner{

	@Override
	public void run(String... args) throws Exception {
		System.out.println(Arrays.asList(args));
		System.out.println(">>>>>>>>>>>>>>>服务启动执行，执行加载数据等操作<<<<<<<<<<<<<");
	}

}
